﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CodeMilkerV2.Models;

namespace CodeMilkerV2.Repositories {
    public class AllowRepository {
        public Allow GetAllow(string conditionName) {
            return GetAll().Where(d => d.Condition == conditionName).Single();
        }

        public List<Allow> GetAll() {
            var allows = new List<Allow> {
                new Allow{ Id=1,  Condition = "String"},
                new Allow{ Id=2,  Condition = "Int"},
                new Allow{ Id=3,  Condition = "Decimal"},
                new Allow{ Id=4,  Condition = "Date"}                
            };

            return allows;
        }
    }
}
